package com.syh.jn.scm.domain.supplier.repository.purchase;

import cn.redscarf.commons.wrapper.Wrapper;
import com.syh.core.ddd.infrastructure.repository.AggregateRepository;
import com.syh.core.ddd.infrastructure.repository.CreateRepo;
import com.syh.core.ddd.infrastructure.repository.DeleteRepo;
import com.syh.core.ddd.infrastructure.repository.UpdateRepo;
import com.syh.jn.scm.domain.supplier.entity.purchase.PurchaseOrder;
import com.syh.jn.scm.domain.supplier.entity.purchase.PurchaseOrderItem;
import com.syh.jn.scm.dto.supplier.purchase.PurStatisticalAmountVo;

import java.util.List;

public interface PurchaseOrderRepository extends PurchaseOrderReadRepository, CreateRepo<PurchaseOrder, Long>, DeleteRepo<PurchaseOrder, Long>, UpdateRepo<PurchaseOrder, Long> {


  /**
   * 重载更新方法  选择是否更新订单项
   * @param order
   * @param isUpdateItem true：更新订单项 false：不更新订单项
   */
  public void update(PurchaseOrder order, boolean isUpdateItem);

  /**
   * 上传图片
   *
   * @param order
   */
  public void upload(PurchaseOrder order);

  /**
   * 更新订单及订单项
   * @param order
   */
  public void updateOrderAndItems(PurchaseOrder order);

  /**
   * 根据服务商id删除采购单
   * @param businessEntityId
   */
  void deleteByBusinessEntityId(Long businessEntityId);

}
